
function setWxFz() {
  if ( typeof WeixinJSBridge == "object" && typeof WeixinJSBridge.invoke == "function") {
    handleFontSize();
  } else {
    if (document.addEventListener) {
      document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
    } else if (document.attachEvent) {
      document.attachEvent("WeixinJSBridgeReady", handleFontSize);
      document.attachEvent("onWeixinJSBridgeReady", handleFontSize);  }
  }
  function handleFontSize() {
    WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
    WeixinJSBridge.on('menu:setfont', function() {
      WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize' : 0 });
    });
  }
}
let ua = window.navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
  setWxFz();
}
let containerwidth = Number(document.getElementsByTagName('html')[0].offsetWidth);
let winwidth = Number(window.innerWidth);
if (winwidth > 1024) {
  containerwidth = 500;
}
document.documentElement.style.fontSize = (containerwidth / 750) * 100 + 'px';


